<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="icon" href="../static/favicon.png" type="image/png">
    <link rel="stylesheet" href="../static/plugins/bootstrap-5.3.7-dist/css/bootstrap.min.css">
    <link rel="stylesheet" href="../static/plugins/fontawesome-free-6.0.0-web/css/all.min.css">
    <title>500 - 页面未找到</title>
    <style>
        body {
            font-family: 'Segoe UI', Arial, sans-serif;
            background: #f8f9fa;
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            margin: 0;
        }

        .error-container {
            text-align: center;
            background: #fff;
            padding: 2rem;
            border-radius: 10px;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
            max-width: 500px;
            width: 90%;
        }

        .error-code {
            font-size: 4rem;
            color: #dc3545;
            margin-bottom: 1rem;
        }

        h1 {
            font-size: 1.5rem;
            margin-bottom: 1rem;
            color: #495057;
        }

        p {
            color: #6c757d;
            margin-bottom: 2rem;
        }

        .btn-a:hover {
            background: #0056b3;
            transform: translateY(-2px);
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        }

        .search-box {
            position: relative;
            /*width: 450px;*/
        }

        .search-box input {
            width: 100%;
            padding: 0.5rem;
            margin-bottom: 1rem;
            border: 1px solid #ced4da;
            border-radius: 20px;
        }
        .btn-a {
            display: inline-block;
            padding: 0.5rem 1rem;
            margin: 0.3rem;
            background: #007bff;
            color: white;
            text-decoration: none;
            border-radius: 25px;
            transition: all 0.3s ease;
        }

        .search-button {
            position: absolute;
            right: 10px; /* 调整按钮位置 */
            top: 35%;
            transform: translateY(-50%);
            color: cadetblue;
            border: none;
            cursor: pointer;
            font-size: 16px;
        }
        /*.search-button:hover {*/
        /*    background-color: #0056b3;*/
        /*}*/
        .footer-links a {
            color: #6c757d;
            margin: 0 0.5rem;
            text-decoration: none;
        }

        .footer-links a:hover {
            color: #007bff;
        }

        @media (max-width: 576px) {
            .error-code {
                font-size: 3rem;
            }
        }
    </style>
</head>
<body>
<div class="error-container">
    <div><img src="../static/favicon.png" alt="" width="80px"></div>
    <div class="error-code">500</div>
    <h1>您访问的页面不存在</h1>
    <p>可能原因：页面已被删除、链接错误或您没有访问权限</p>

    <div class="search-box">
        <input type="text" placeholder="试试搜索...">
        <button class="btn btn-outline-light search-button"><i class="fa fa-search"
                                                               aria-hidden="true"></i>搜索
        </button>
    </div>

    <a href="/" class="btn-a">返回首页</a>
    <a href="/contact" class="btn-a">联系支持</a>

    <div class="footer-links" style="margin-top: 50px">
        或者访问我们的热门页面：
        <a href="/about">关于</a>
        <a href="/services">服务</a>
        <a href="/blog">博客</a>
    </div>
</div>

<script>
    // 自动填充搜索框（示例功能）
    document.querySelector('.search-box button').onclick = function (e) {
        e.preventDefault;
        const query = prompt('请输入搜索内容：');
        if (query) window.location.href = `/search?q= $ {encodeURIComponent(query)}`;
    };
</script>
</body>
</html>